package com.ruoyi.manage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.SocInsuranceMapper;
import com.ruoyi.manage.domain.SocInsurance;
import com.ruoyi.manage.service.ISocInsuranceService;

/**
 * 员工社保信息Service业务层处理
 * 
 * @author cf
 * @date 2025-06-02
 */
@Service
public class SocInsuranceServiceImpl implements ISocInsuranceService 
{
    @Autowired
    private SocInsuranceMapper socInsuranceMapper;

    /**
     * 查询员工社保信息
     * 
     * @param id 员工社保信息主键
     * @return 员工社保信息
     */
    @Override
    public SocInsurance selectSocInsuranceById(Long id)
    {
        return socInsuranceMapper.selectSocInsuranceById(id);
    }

    /**
     * 查询员工社保信息列表
     * 
     * @param socInsurance 员工社保信息
     * @return 员工社保信息
     */
    @Override
    public List<SocInsurance> selectSocInsuranceList(SocInsurance socInsurance)
    {
        return socInsuranceMapper.selectSocInsuranceList(socInsurance);
    }

    /**
     * 新增员工社保信息
     * 
     * @param socInsurance 员工社保信息
     * @return 结果
     */
    @Override
    public int insertSocInsurance(SocInsurance socInsurance)
    {
        socInsurance.setCreateTime(DateUtils.getNowDate());
        return socInsuranceMapper.insertSocInsurance(socInsurance);
    }

    /**
     * 修改员工社保信息
     * 
     * @param socInsurance 员工社保信息
     * @return 结果
     */
    @Override
    public int updateSocInsurance(SocInsurance socInsurance)
    {
        socInsurance.setUpdateTime(DateUtils.getNowDate());
        return socInsuranceMapper.updateSocInsurance(socInsurance);
    }

    /**
     * 批量删除员工社保信息
     * 
     * @param ids 需要删除的员工社保信息主键
     * @return 结果
     */
    @Override
    public int deleteSocInsuranceByIds(Long[] ids)
    {
        return socInsuranceMapper.deleteSocInsuranceByIds(ids);
    }

    /**
     * 删除员工社保信息信息
     * 
     * @param id 员工社保信息主键
     * @return 结果
     */
    @Override
    public int deleteSocInsuranceById(Long id)
    {
        return socInsuranceMapper.deleteSocInsuranceById(id);
    }
}
